﻿      
     
      
CREATE proc [dbo].[danhmucKhoanMucPhi_xoa]          
@Ma_KMuc varchar(25)          
as          
declare @dem as int          
select @dem=COUNT(*) from DM_KhoanMucChiPhi where Ma_KMuc=@Ma_KMuc       
if(@dem>0)          
begin          
      
delete from  DM_KhoanMucChiPhi where Ma_KMuc=@Ma_KMuc              
select ErrCode=1          
end          
else          
begin          
          
select ErrCode=0          
end   